package com.baizhi.feign;

import com.baizhi.entity.StudentTag;
import com.baizhi.feign.rollback.TagRollBack;
import com.baizhi.po.TagsPO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;

@FeignClient(value = "TAG", fallback = TagRollBack.class)
public interface FeignTag {

    @GetMapping("/tagsstudent")
    public ArrayList<Long> queryAll(@RequestParam("id") Long sid);

    @GetMapping("/tags/tags")
    public TagsPO queryAlls(@RequestParam Long id);

    @PostMapping("/tagsstudent")
    public void addTags(@RequestBody StudentTag studentTag);
}
